package priv.yiyuan.example.design.flyweight;

/**
 * @author YiYuan
 * @data 2025/9/16
 * @apoNote
 */
public class QuizResource implements CourseResource {

    private final String type;

    public QuizResource(String type) {
        this.type = type;
        System.out.println("创建了一个新的测验资源对象: " + type);
    }

    @Override
    public void preview(String extrinsicState) {
        System.out.println("正在预览 " + type + " 测验, 题目: " + extrinsicState);
    }

    @Override
    public String getType() {
        return type;
    }
}
